home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 64 72 | 75 69 64 2e 62 6f 72 6c |Path: dr|uid.borl|
|00000010| 61 6e 64 2e 63 6f 6d 21 | 75 73 65 6e 65 74 0a 46 |and.com!|usenet.F|
|00000020| 72 6f 6d 3a 20 4a 65 66 | 66 20 4a 65 6e 6b 69 6e |rom: Jef|f Jenkin|
|00000030| 73 20 3c 6a 6a 65 6e 6b | 69 6e 73 40 77 70 6f 2e |s <jjenk|ins@wpo.|
|00000040| 62 6f 72 6c 61 6e 64 2e | 63 6f 6d 3e 0a 4e 65 77 |borland.|com>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 2b 2b 0a 53 | 75 62 6a 65 63 74 3a 20 |ng.c++.S|ubject: |
|00000070| 52 65 3a 20 54 65 6d 70 | 6c 61 74 65 20 69 6e 73 |Re: Temp|late ins|
|00000080| 74 61 6e 74 69 61 74 69 | 6f 6e 20 61 6e 64 20 69 |tantiati|on and i|
|00000090| 6e 6c 69 6e 69 6e 67 0a | 44 61 74 65 3a 20 46 72 |nlining.|Date: Fr|
|000000a0| 69 2c 20 32 33 20 46 65 | 62 20 31 39 39 36 20 31 |i, 23 Fe|b 1996 1|
|000000b0| 35 3a 32 32 3a 31 33 20 | 2d 30 38 30 30 0a 4f 72 |5:22:13 |-0800.Or|
|000000c0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 42 6f 72 6c |ganizati|on: Borl|
|000000d0| 61 6e 64 20 49 6e 74 65 | 72 6e 61 74 69 6f 6e 61 |and Inte|rnationa|
|000000e0| 6c 0a 4d 65 73 73 61 67 | 65 2d 49 44 3a 20 3c 33 |l.Messag|e-ID: <3|
|000000f0| 31 32 45 34 43 32 35 2e | 37 45 32 31 40 77 70 6f |12E4C25.|7E21@wpo|
|00000100| 2e 62 6f 72 6c 61 6e 64 | 2e 63 6f 6d 3e 0a 52 65 |.borland|.com>.Re|
|00000110| 66 65 72 65 6e 63 65 73 | 3a 20 3c 34 67 69 72 76 |ferences|: <4girv|
|00000120| 6d 24 36 65 67 40 73 70 | 68 69 6e 78 2e 63 6f 6d |m$6eg@sp|hinx.com|
|00000130| 63 6f 2e 63 6f 6d 3e 0a | 4e 4e 54 50 2d 50 6f 73 |co.com>.|NNTP-Pos|
|00000140| 74 69 6e 67 2d 48 6f 73 | 74 3a 20 62 65 61 73 74 |ting-Hos|t: beast|
|00000150| 6c 79 2e 62 6f 72 6c 61 | 6e 64 2e 63 6f 6d 0a 4d |ly.borla|nd.com.M|
|00000160| 69 6d 65 2d 56 65 72 73 | 69 6f 6e 3a 20 31 2e 30 |ime-Vers|ion: 1.0|
|00000170| 0a 43 6f 6e 74 65 6e 74 | 2d 54 79 70 65 3a 20 74 |.Content|-Type: t|
|00000180| 65 78 74 2f 70 6c 61 69 | 6e 3b 20 63 68 61 72 73 |ext/plai|n; chars|
|00000190| 65 74 3d 75 73 2d 61 73 | 63 69 69 0a 43 6f 6e 74 |et=us-as|cii.Cont|
|000001a0| 65 6e 74 2d 54 72 61 6e | 73 66 65 72 2d 45 6e 63 |ent-Tran|sfer-Enc|
|000001b0| 6f 64 69 6e 67 3a 20 37 | 62 69 74 0a 58 2d 4d 61 |oding: 7|bit.X-Ma|
|000001c0| 69 6c 65 72 3a 20 4d 6f | 7a 69 6c 6c 61 20 32 2e |iler: Mo|zilla 2.|
|000001d0| 30 62 35 20 28 57 69 6e | 39 35 3b 20 49 29 0a 54 |0b5 (Win|95; I).T|
|000001e0| 6f 3a 20 53 68 61 72 6d | 61 20 3c 73 68 61 72 6d |o: Sharm|a <sharm|
|000001f0| 61 40 63 6f 6d 63 6f 2e | 63 6f 6d 3e 0a 0a 53 68 |a@comco.|com>..Sh|
|00000200| 61 72 6d 61 20 77 72 6f | 74 65 3a 0a 3e 20 0a 3e |arma wro|te:.> .>|
|00000210| 20 49 6e 20 6f 72 64 65 | 72 20 74 6f 20 70 72 65 | In orde|r to pre|
|00000220| 76 65 6e 74 20 6d 75 6c | 74 69 70 6c 65 20 69 6e |vent mul|tiple in|
|00000230| 73 74 61 6e 74 69 61 74 | 69 6f 6e 73 20 6f 66 20 |stantiat|ions of |
|00000240| 74 65 6d 70 6c 61 74 65 | 64 20 63 6c 61 73 73 65 |template|d classe|
|00000250| 73 20 28 66 6f 72 0a 3e | 20 73 69 6d 69 6c 61 72 |s (for.>| similar|
|00000260| 20 70 61 72 61 6d 65 74 | 65 72 20 74 79 70 65 73 | paramet|er types|
|00000270| 29 2c 20 49 20 77 61 6e | 74 20 74 6f 20 75 73 65 |), I wan|t to use|
|00000280| 20 65 78 70 6c 69 63 69 | 74 20 69 6e 73 74 61 6e | explici|t instan|
|00000290| 74 69 61 74 69 6f 6e 73 | 2e 20 49 0a 3e 20 77 61 |tiations|. I.> wa|
|000002a0| 6e 74 20 74 6f 20 70 6c | 61 63 65 20 74 68 65 73 |nt to pl|ace thes|
|000002b0| 65 20 65 78 70 6c 69 63 | 69 74 20 69 6e 73 74 61 |e explic|it insta|
|000002c0| 6e 74 69 61 74 69 6f 6e | 73 20 69 6e 20 61 20 73 |ntiation|s in a s|
|000002d0| 65 70 61 72 61 74 65 20 | 66 69 6c 65 20 61 6e 64 |eparate |file and|
|000002e0| 20 6c 65 74 0a 3e 20 74 | 68 65 20 61 63 74 75 61 | let.> t|he actua|
|000002f0| 6c 20 73 6f 75 72 63 65 | 20 66 69 6c 65 73 20 75 |l source| files u|
|00000300| 73 69 6e 67 20 74 65 6d | 70 6c 61 74 65 64 20 63 |sing tem|plated c|
|00000310| 6c 61 73 73 65 73 20 27 | 73 65 65 27 20 74 68 65 |lasses '|see' the|
|00000320| 20 64 65 66 69 6e 69 74 | 69 6f 6e 0a 3e 20 6f 66 | definit|ion.> of|
|00000330| 20 74 68 65 20 74 65 6d | 70 6c 61 74 65 64 20 63 | the tem|plated c|
|00000340| 6c 61 73 73 65 73 2e 20 | 57 68 61 74 20 69 73 20 |lasses. |What is |
|00000350| 6e 6f 74 20 63 6c 65 61 | 72 20 74 6f 20 6d 65 20 |not clea|r to me |
|00000360| 69 73 20 69 66 20 74 68 | 65 20 6d 65 6d 62 65 72 |is if th|e member|
|00000370| 0a 3e 20 66 75 6e 63 74 | 69 6f 6e 73 20 64 65 63 |.> funct|ions dec|
|00000380| 6c 61 72 65 64 20 69 6e | 6c 69 6e 65 64 20 28 61 |lared in|lined (a|
|00000390| 6e 64 20 64 65 66 69 6e | 65 64 20 69 6e 20 68 65 |nd defin|ed in he|
|000003a0| 61 64 65 72 20 66 69 6c | 65 29 20 77 69 6c 6c 20 |ader fil|e) will |
|000003b0| 61 63 74 75 61 6c 6c 79 | 0a 3e 20 67 65 74 20 69 |actually|.> get i|
|000003c0| 6e 6c 69 6e 65 64 20 69 | 6e 20 74 68 65 20 73 6f |nlined i|n the so|
|000003d0| 75 72 63 65 20 66 69 6c | 65 20 75 73 69 6e 67 20 |urce fil|e using |
|000003e0| 74 68 65 6d 2c 20 69 66 | 20 69 6d 70 6c 69 63 69 |them, if| implici|
|000003f0| 74 20 74 65 6d 70 6c 61 | 74 65 0a 3e 20 69 6e 73 |t templa|te.> ins|
|00000400| 74 61 6e 74 69 61 74 69 | 6f 6e 20 69 73 20 74 75 |tantiati|on is tu|
|00000410| 72 6e 65 64 20 6f 66 66 | 20 28 63 61 6e 20 62 65 |rned off| (can be|
|00000420| 20 64 6f 6e 65 20 69 6e | 20 67 63 63 29 20 3f 0a | done in| gcc) ?.|
|00000430| 3e 20 0a 3e 20 43 6f 6e | 73 69 64 65 72 20 74 68 |> .> Con|sider th|
|00000440| 69 73 20 65 78 61 6d 70 | 6c 65 3a 0a 3e 20 0a 3e |is examp|le:.> .>|
|00000450| 20 66 69 6c 65 20 66 6f | 6f 2e 68 0a 3e 20 2d 2d | file fo|o.h.> --|
|00000460| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 3e 20 0a 3e 20 74 65 |--------|.> .> te|
|00000470| 6d 70 6c 61 74 65 20 3c | 63 6c 61 73 73 20 54 3e |mplate <|class T>|
|00000480| 0a 3e 20 63 6c 61 73 73 | 20 66 6f 6f 20 7b 0a 3e |.> class| foo {.>|
|00000490| 20 20 69 6e 6c 69 6e 65 | 20 64 6f 5f 73 6f 6d 65 | inline| do_some|
|000004a0| 74 68 69 6e 67 28 29 20 | 7b 2e 2e 2e 7d 3b 0a 3e |thing() |{...};.>|
|000004b0| 20 20 6f 74 68 65 72 5f | 66 75 6e 63 74 69 6f 6e | other_|function|
|000004c0| 73 20 28 64 65 66 69 6e | 65 64 20 69 6e 20 66 6f |s (defin|ed in fo|
|000004d0| 6f 2e 43 29 3b 0a 3e 20 | 7d 0a 3e 20 0a 3e 20 66 |o.C);.> |}.> .> f|
|000004e0| 69 6c 65 20 66 6f 6f 2d | 69 6e 73 74 2e 43 0a 3e |ile foo-|inst.C.>|
|000004f0| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00000500| 0a 3e 20 23 69 6e 63 6c | 75 64 65 20 22 66 6f 6f |.> #incl|ude "foo|
|00000510| 2e 68 22 0a 3e 20 23 69 | 6e 63 6c 75 64 65 20 22 |.h".> #i|nclude "|
|00000520| 66 6f 6f 2e 43 22 0a 3e | 20 0a 3e 20 74 65 6d 70 |foo.C".>| .> temp|
|00000530| 6c 61 74 65 20 63 6c 61 | 73 73 20 66 6f 6f 3c 69 |late cla|ss foo<i|
|00000540| 6e 74 3e 3b 0a 3e 20 74 | 65 6d 70 6c 61 74 65 20 |nt>;.> t|emplate |
|00000550| 63 6c 61 73 73 20 66 6f | 6f 3c 64 6f 75 62 6c 65 |class fo|o<double|
|00000560| 3e 3b 0a 3e 20 0a 3e 20 | 43 6f 6d 70 69 6c 61 74 |>;.> .> |Compilat|
|00000570| 69 6f 6e 20 6f 66 20 66 | 6f 6f 2d 69 6e 73 74 2e |ion of f|oo-inst.|
|00000580| 43 20 77 69 6c 6c 20 69 | 6e 73 74 61 6e 74 69 61 |C will i|nstantia|
|00000590| 74 65 20 76 61 72 69 6f | 75 73 20 66 6f 6f 20 63 |te vario|us foo c|
|000005a0| 6c 61 73 73 65 73 0a 3e | 20 28 65 78 61 63 74 6c |lasses.>| (exactl|
|000005b0| 79 20 6f 6e 63 65 29 2e | 0a 3e 20 0a 3e 20 66 69 |y once).|.> .> fi|
|000005c0| 6c 65 20 6d 61 69 6e 2e | 43 0a 3e 20 2d 2d 2d 2d |le main.|C.> ----|
|000005d0| 2d 2d 2d 2d 2d 2d 2d 0a | 3e 20 23 69 6e 63 6c 75 |-------.|> #inclu|
|000005e0| 64 65 20 22 66 6f 6f 2e | 68 22 0a 3e 20 0a 3e 20 |de "foo.|h".> .> |
|000005f0| 76 6f 69 64 20 6d 61 69 | 6e 20 28 29 0a 3e 20 7b |void mai|n ().> {|
|00000600| 0a 3e 20 20 66 6f 6f 3c | 69 6e 74 3e 20 61 3b 0a |.> foo<|int> a;.|
|00000610| 3e 20 20 66 6f 6f 3c 64 | 6f 75 62 6c 65 3e 20 62 |> foo<d|ouble> b|
|00000620| 3b 0a 3e 20 0a 3e 20 20 | 61 2e 64 6f 5f 73 6f 6d |;.> .> |a.do_som|
|00000630| 65 74 68 69 6e 67 28 29 | 3b 0a 3e 20 20 62 2e 64 |ething()|;.> b.d|
|00000640| 6f 5f 73 6f 6d 65 74 68 | 69 6e 67 28 29 3b 0a 3e |o_someth|ing();.>|
|00000650| 20 7d 0a 3e 20 0a 3e 20 | 51 75 65 73 74 69 6f 6e | }.> .> |Question|
|00000660| 20 69 73 3a 20 77 69 6c | 6c 20 64 6f 5f 73 6f 6d | is: wil|l do_som|
|00000670| 65 74 68 69 6e 67 28 29 | 20 62 65 20 69 6e 6c 69 |ething()| be inli|
|00000680| 6e 65 64 20 69 6e 20 6d | 61 69 6e 2c 20 69 66 20 |ned in m|ain, if |
|00000690| 69 6d 70 6c 69 63 69 74 | 0a 3e 20 69 6e 73 74 61 |implicit|.> insta|
|000006a0| 6e 74 69 61 74 69 6f 6e | 20 6f 66 20 66 6f 6f 20 |ntiation| of foo |
|000006b0| 69 73 20 73 75 70 70 72 | 65 73 73 65 64 20 68 65 |is suppr|essed he|
|000006c0| 72 65 20 28 64 75 72 69 | 6e 67 20 63 6f 6d 70 69 |re (duri|ng compi|
|000006d0| 6c 61 74 69 6f 6e 29 20 | 3f 0a 3e 20 0a 3e 20 41 |lation) |?.> .> A|
|000006e0| 20 6d 6f 72 65 20 67 65 | 6e 65 72 61 6c 20 71 75 | more ge|neral qu|
|000006f0| 65 73 74 69 6f 6e 20 77 | 6f 75 6c 64 20 62 65 20 |estion w|ould be |
|00000700| 77 68 65 74 68 65 72 20 | 69 6e 6c 69 6e 69 6e 67 |whether |inlining|
|00000710| 20 6f 66 20 6d 65 6d 62 | 65 72 20 6d 65 74 68 6f | of memb|er metho|
|00000720| 64 73 20 69 73 0a 3e 20 | 70 6f 73 73 69 62 6c 65 |ds is.> |possible|
|00000730| 20 77 69 74 68 6f 75 74 | 20 69 6e 73 74 61 6e 74 | without| instant|
|00000740| 69 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 63 6c |iation o|f the cl|
|00000750| 61 73 73 20 69 74 73 65 | 6c 66 20 3f 0a 3e 20 0a |ass itse|lf ?.> .|
|00000760| 3e 20 53 75 72 65 73 68 | 0a 0a 4d 6f 72 65 20 74 |> Suresh|..More t|
|00000770| 68 61 6e 20 6c 69 6b 65 | 6c 79 20 74 68 69 73 20 |han like|ly this |
|00000780| 69 73 20 63 6f 6d 70 69 | 6c 65 72 20 69 6d 70 6c |is compi|ler impl|
|00000790| 6d 65 6e 74 61 74 69 6f | 6e 20 64 65 70 65 6e 64 |mentatio|n depend|
|000007a0| 65 6e 74 2e 20 20 49 20 | 68 61 76 65 6e 27 74 20 |ent. I |haven't |
|000007b0| 0a 6c 6f 6f 6b 65 64 20 | 61 74 20 74 68 65 20 77 |.looked |at the w|
|000007c0| 6f 72 6b 69 6e 67 20 70 | 61 70 65 72 20 74 6f 20 |orking p|aper to |
|000007d0| 73 65 65 20 68 6f 77 20 | 69 74 27 73 20 73 70 65 |see how |it's spe|
|000007e0| 63 69 66 69 65 64 2e 20 | 3f 3f 3f 3f 0a 0a 57 68 |cified. |????..Wh|
|000007f0| 79 20 6e 6f 74 20 6a 75 | 73 74 20 73 74 69 63 6b |y not ju|st stick|
|00000800| 20 74 68 65 20 74 65 6d | 70 6c 61 74 65 20 63 6c | the tem|plate cl|
|00000810| 61 73 73 20 69 6e 20 74 | 68 65 20 68 65 61 64 65 |ass in t|he heade|
|00000820| 72 2c 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 2c |r, decla|rations,|
|00000830| 20 0a 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 61 6e | .defini|tions an|
|00000840| 64 20 61 6c 6c 21 20 20 | 54 68 65 6e 20 23 69 6e |d all! |Then #in|
|00000850| 63 6c 75 64 65 20 69 74 | 20 77 68 65 72 65 20 79 |clude it| where y|
|00000860| 6f 75 20 6e 65 65 64 20 | 69 74 21 20 0a 0a 2d 2d |ou need |it! ..--|
|00000870| 20 6a 72 6a 0a | | jrj. | |
+--------+-------------------------+-------------------------+--------+--------+